local Players = game:GetService("Players")
local Debris = game:GetService("Debris")
local TweenService = game:GetService("TweenService")

function create(Character)
	local Head = Character:WaitForChild("Head")
	local billboard = Instance.new("BillboardGui", Character)
	billboard.Adornee = Head
	billboard.Size = UDim2.fromScale(10,1.5)
	billboard.StudsOffsetWorldSpace = Vector3.yAxis * 4.5

	local textlabel = Instance.new("TextLabel",billboard)
	textlabel.Size = UDim2.fromScale(1,1)
	textlabel.BackgroundTransparency = 1
	textlabel.Text = ""
	textlabel.TextScaled = true
	textlabel.TextColor3 = Color3.fromRGB(255,255,255)
	textlabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
	textlabel.TextTransparency = 1
	textlabel.TextStrokeTransparency = 1
	textlabel.Font = Enum.Font.Cartoon
	return textlabel
end

local sounds = {
	["🤨"] = 6308606116;
	["huh?"] = 154157416;
	["😡"] = 154157312;
	[">:("] = 154157312;
	["😠"] = 154157312;
	["hi"] = 154147007;
	["bye"] = 154157386;
	["😭"] = 154146535;
	["XD"] = 154157543;
	["yeah!"] = 154157524;
	["wow"] = 154157291;
	["🤔"] = 154157584;
	["burp"] = 9063136964;	-- it plays that when you say burp
	["bleugh"] = 5518971385;
	["eww"] = 87152155816232;
	["ewww"] = 113392495883301;
	["ouch"] = 12222058;
	["oof"] = 79348298352567;
	["ow"] = 5231822585;
	["hahaha"] = 17620645740;
	["haha"] = 17620645740;
	["lol"] = 17620645740;             
	["metal pipe"] = 15641323951;
	["ahhhh"] = 108277187006018;
	["ahhhhhh"] = 108277187006018;
	["hehehe"] = 17712048342;
	["muhehehe"] = 1601659619; -- find the sound from marketplace or toolbox and get sound id
	--["whatokay!!!!!"] = ;
	["ahh"] = 108277187006018;
	["meow"] = 7148585764;
	["maow"] = 18570808286;
	["meow :3"] = 18570808286; -- but don't modify these scripts i made pleaseeee 3:
	["prr meow"] = 5104257032;-- used creaor hub in toolblox id sound
	["i hate you"] = 212000587;
	["uhaha"] = 5832751119;
	["HAHHAHA"] = 265201042;
	["killer fish"] = 7092545978;
	["killer fish from san diego"] = 7092545978;
	["hmmm"] = 7036389387;
	[":3"] = 121183980114395;
	["3:"] = 159102636;
	["what the hell"] = 17897765161;
	["wth"] = 17897765161;
	["what the hell oh my god"] = 17897765161;
	["bonk!"] = 7574780072;
	["bonk"] = 94821649837983;
	[":/"] = 74774880911302;
	["two time respawn"] = 101967393443449;
	["stop you violated the rules"] = 135308158;
	["violated the rules"] = 135308158;
	["ok you're banned"] = 94510808656705;
	["yep you're banned"] = 86596274685790;
	["yep you're banned good night"] = 18486614207;
	["ban"] = 147722910;
	["you're banned"] =18486614207;
	["close to me"] = 89188745224181;
	["close to me!"] = 89188745224181;
	["close to me!!"] = 89188745224181;
	[":("] = 8904888220;
	["hey it's me"] = 122225485261026;
	["hey its me"] = 122225485261026;
	["lets do that again some times"] = 134465374070275;
	["lets do that again some times!"] = 134465374070275;
	["lets do that again, some times"] = 134465374070275;
	["lets do that again, some times!"] = 134465374070275;
	["let's do that again some times"] = 134465374070275;
	["let's do that again some times!"] = 134465374070275;
	["let's do that again, some times"] = 134465374070275;
	["let's do that again, some times!"] = 134465374070275;
	["i'm telling dad"] = 82347871291422;
	["here you are"] = 129911400031350;
	["one more left"] = 99111746256045;
	["hahahaha"] = 126083075694948;
	["i'm it i'm it i'm it"]= 137599783866468;
	["no fair"] = 115927698649509;
	["gocha"] =88870687177894;
	["tag! you're it"] = 85596665568206;
	["tag you're it"] = 85596665568206;
	["tag! you're in it"] = 85596665568206;
	["tag you're in it"] = 85596665568206;
	["tag! you're it!"] = 85596665568206;
	["tag you're it!"] = 85596665568206;
	["tag! you're in it!"] = 85596665568206;
	["tag you're in it!"] = 85596665568206;
	["hawk tuah!"] = 104537552188658;
	["hawk tuah"] = 104537552188658;
	["auch"] = 82520834438491;
	["coughs"] = 72861611511867;
	["cough"] = 72861611511867;
	["violently coughs"] = 72861611511867;
	["violently cough"] = 72861611511867;
	["trickshot"] = 133615167472559;
	["booger man"] = 110277111444497;
	["boogerman"] = 110277111444497;
	["corrupt nature"] = 99761211238896;
	["corrupt nature!"] = 99761211238896;
	["corrupt nature!!"] = 99761211238896;
	["corrupt nature!!!"] = 99761211238896;
	["corrupt nature!!!!"] = 99761211238896;
	["corrupt nature!!!!!"] = 99761211238896;
	["here i go"] = 119937496927388;
	["tgh no one saw that right?"] = 128811607334302;
	["wanna hear my catchphrase? nvm i forgot"] = 134728518283919;
	["wanna hear my catchphrase? uh nvm i forgot"] = 134728518283919;
	["wanna hear my catchphrase"] = 134728518283919;
	["wanna hear my catchphrase uh nvm i forgot"] = 134728518283919;
	["hehehe!"] = 111069220586099;
	["oh the painn"] =93997080329253;
	["oh the pain"] =93997080329253;
	["oh the pain!"] =93997080329253;
	["oh the pain!!"] =93997080329253;
	["erm what the sigma"] = 17608357332;
	["erm, what the sigma"] = 17608357332;
	["erm what the sigma?"] = 17608357332;
	["erm, what the sigma?"] = 17608357332;
	["erm... what the sigma"] = 17608357332;
	["erm... what the sigma?"] = 17608357332;
	["di do do"] = 113185965148240;
	["di do do di do do"] = 113185965148240;
	["di do do beep"] = 113185965148240;
	["di do do di do do beep"] = 113185965148240;
	["."] = 6655708496;
	["&gt;:3"] = 17800012470;
	["pop"] = 126172550651333;
	["i always come back"] = 73552594129769;
	["u i u ah ah"] = 8532843540;
	["ahhhhhhhhh"] = 111291271210974;
	["here we go folks"] = 98858588077052;
	["you're short"] = 117050393188764;
	["i see one of them"] = 132254400226247;
	["you're mine"] = 130371047011999;
	["you won't live to see the next day"] = 138878442844807;
	["i love knocking out theet"] = 112279092893914;
	["just shut up and rage quit"] = 123448883378825;
	["whats for breakfast dad"] = 669925317;
	["fire in the hole"] = 17197090544;
}

function generate(soundId, parent)
	local sound = Instance.new("Sound")
	sound.SoundId = "rbxassetid://" .. soundId
	sound.Parent = parent
	sound.Volume = 1 / 3
	sound:Play()
	Debris:AddItem(sound, sound.TimeLength + 1)
end

function poo(playername)
	local soundid = 79348298352567
	local players = {}
	if not playername then
		players = Players:GetPlayers()
	else
		for i,name in pairs(playername) do
			if Players:FindFirstChild(name) then
				table.insert(players, Players:FindFirstChild(name))
			end
		end
	end

	if not players or #players == 0 then
		error("i guess it errored")
		return
	end

	for i,player in pairs(players) do
		if not player then
			error("Player named "..playername.." has not been found!")
			return
		end
		if not player:IsA("Player") then
			error(playername.." is not a player!")
			return
		end

		local Character = player.Character or player.CharacterAdded:Wait()
		local Head = Character:WaitForChild("Head")
		local textlabel = create(Character)

		local characterconnection = player.CharacterAdded:Connect(function(character)
			Character = character
			Head = character:WaitForChild("Head")

			textlabel = create(Character)
		end)

		local currentTask
		local currentTween

		local connection = player.Chatted:Connect(function(message)
			-- convert &gt; and other entry into correct one
			local originalmessage = message
			message = message:gsub("&gt;",">"):gsub("&lt;","<"):gsub("&quot;","\""):gsub("&apos;","'"):gsub("&amp;","&")
			local splitted = string.split(message," ")
			if splitted[1] ~= "/e" then
				-- iterate the sounds table
				local temp = sounds[message:lower()] or sounds[originalmessage:lower()]
				if temp then
					generate(temp,Head)
				end
				-- filter the string before processing
				local success, result = pcall(function()
					return game:GetService("TextService"):FilterStringAsync(message,player.UserId)
				end)

				if success then
					message = result:GetNonChatStringForBroadcastAsync()
					if currentTask then task.cancel(currentTask) currentTask = nil end
					if currentTween then currentTween:Cancel() currentTween = nil end
					currentTask = task.spawn(function()
						task.wait(0.1)
						textlabel.TextTransparency = 0
						textlabel.TextStrokeTransparency = 0
						textlabel.Text = ""
						for i = 1, message:len() do
							textlabel.Text = message:sub(1,i)
							local sound = Instance.new("Sound", Head)
							sound.SoundId = "rbxassetid://"..soundid
							sound.PlaybackSpeed = math.random(99,101)/100
							sound.Volume = 0.25
							sound:Play()
							Debris:AddItem(sound, 1)
							task.wait(0.05)
							sound:Stop()
						end
						task.wait(2)
						currentTween = TweenService:Create(textlabel,TweenInfo.new(1),{TextTransparency = 1, TextStrokeTransparency = 1})
						currentTween:Play()
					end)
				else
					warn("Failed to filter text: "..result)
				end
			elseif splitted[1] == "/e" then
				if splitted[2] == "talk_id" then
					soundid = tonumber(splitted[3])
				end
			end
		end)

		player.Destroying:Once(function()
			if currentTask then task.cancel(currentTask) currentTask = nil end
			if currentTween then currentTween:Cancel() currentTween = nil end
			characterconnection:Disconnect()
			connection:Disconnect()
		end)
	end
end

poo({"p0x38"})